<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <#include "/pubHeadStyle.html">
</head>
<body>
<form class="layui-form" action="" style="margin: 10px 11px auto;" lay-filter="exportForm" id="exportForm">
    <div class="layui-form-item">
        <div class="layui-input-block" style="margin-left: 0">
            <table class="layui-table"   >
                <tr>
                    <td><input type="checkbox" name="actDefModel"disabled checked title="流程定义"></td>
                    <td><input type="checkbox" name="actDefModelHistory"  checked title="历史版本"></td>
                </tr>
                <tr>
                    <td><input type="checkbox" name="bpmNodeSet" disabled checked title="流程节点设置"></td>
                    <td><input type="checkbox" name="bpmNodeUser"         checked title="流程人员设置"></td>
                </tr>
                <tr>
                    <td><input type="checkbox" name="taskApprovalItems"   checked title="常用语设置"></td>
                    <td><input type="checkbox" name="bpmNodeRule"         checked title="流程跳转规则"></td>
                </tr>
                <tr>
                    <td><input type="checkbox" name="bpmNodeScript"       checked title="流程事件脚本"></td>
                    <td><input type="checkbox" name="bpmNodeButton"       checked title="流程操作按钮设置"></td>
                </tr>
                <tr>
                    <td><input type="checkbox" name="bpmDefVar"           checked title="流程变量"></td>
                    <td><input type="checkbox" name="taskReminder"        checked title="流程节点催办事件设置"></td>
                </tr>
                <tr>
                    <td><input type="checkbox" name="bpmNodeSign"         checked title="流程会签规则"></td>
                    <td><input type="checkbox" name="bpmNodeMessage"      checked title="流程消息"></td>
                </tr>
                <tr>
                    <td><input type="checkbox" name="bpmDefRights"        checked title="流程定义表单权限"></td>
                    <td><input type="checkbox" name="formDef"             checked title="自定义表单和其对应的表"></td>
                </tr>
                <tr>
                    <td><input type="checkbox" name="subActDefModel"      checked title="内（外）部子流程"></td>
                    <td><input type="checkbox" name="bpmTriggerDef"       checked title="流程触发定义"></td>
                </tr>
                <tr>
                    <!--bpm_node_sql表，待添加后解除注释-->
                    <!--<td><input type="checkbox" name="bpmDefSql"           checked title="流程SQL定义"></td>-->
                    <td><input type="checkbox" name="nodeMsgTemplate"     checked title="消息模块定义"></td>
                </tr>
            </table>
        </div>
    </div>
    <div class="layui-btn-container layui-footer" style="position: absolute;left:37%;bottom:0">
        <button type="button" class="layui-btn layui-btn-m" lay-submit lay-filter="exportBtn">导出</button>
        <button class="layui-btn layui-btn-m layui-btn-danger" id="return">取消</button>
    </div>
</form>
<script>
    layui.config({
        base: serverPath.systemPath + staticPath.systemPath //静态资源所在路径
    }).extend({
        index: 'index' //主入口模块
    }).use(['index','element', 'setter', 'jquery','form','commons'], function () {
        var element = layui.element;
        var $ = layui.$;
        var form = layui.form;
        var setter = layui.setter;
        var commons = layui.commons;

        var index = parent.layer.getFrameIndex(window.name);
        //提交表单
        form.on('submit(exportBtn)', function(data){
            var _data=data.field;
            var _param='';
            for(var obj in _data){
               if(_data[obj]=='on') {
                   _data[obj] = true;
               }else {
                   _data[obj] = false;
               }
               _param += '&'+obj+'='+_data[obj];
            }
            var url = serverPath.workflowPath + setter.workflowLinkPath + 'actDefModel/exportXml?ids=${ids}'+_param;
            window.location.href = url;

            // _param.ids="${ids}";
            // $.ajax({
            //     url: serverPath.workflowPath + setter.workflowLinkPath + 'actDefModel/exportXml'
            //     ,method:'post'
            //     ,data:_param
            //     ,dataType:'json'
            //     ,success:function (res) {
            //         debugger
            //         if(res.code==0){
            //             layer.msg(res.msg,{icon:6});
            //         }else{
            //             layer.msg(res.msg,{icon:5});
            //         }
            //     }
            // })
            return false;
        });


        $('#return').click(function () {
            parent.layer.close(index);
        })
    })
</script>
    <!--统一复选框的长度，及字体居中对齐-->
<style>
    form div.layui-form-checkbox span{
        width: 160px;
        text-align: center;
    }
</style>
</body>
</html>